//package com.bigdata.config;
//
//import org.quartz.Scheduler;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.core.io.ClassPathResource;
//import org.springframework.scheduling.quartz.SchedulerFactoryBean;
//
//import javax.sql.DataSource;
//
///**
// * @author lly
// * @description 定时任务配置
// * @date 2019/10/11 0011
// **/
//@Configuration
//public class QuartzConfig {
//
//    @Autowired
//    @Qualifier("mysqlDataSource")
//    DataSource dataSource;
//
//    @Bean
//    public Scheduler scheduler() {
//        Scheduler scheduler = schedulerFactoryBean().getScheduler();
//        return scheduler;
//    }
//
//    @Bean
//    public SchedulerFactoryBean schedulerFactoryBean() {
//        SchedulerFactoryBean schedulerFactoryBean = new SchedulerFactoryBean();
//        schedulerFactoryBean.setDataSource(dataSource);
//        schedulerFactoryBean.setConfigLocation(new ClassPathResource("/quartz.properties"));
//        schedulerFactoryBean.setApplicationContextSchedulerContextKey("applicationContextKey");
//        return schedulerFactoryBean;
//    }
//
//}
